[[ -n $(docker ps -aqf ancestor=wurstmeister/kafka:2.13-2.7.1) ]] && \
[[ -n $(docker rm -f kafka) ]]
run_id=$(docker run \
  -d \
  --name kafka \
  -p 9092:9092 \
	-e KAFKA_BROKER_ID=0 \
	-e KAFKA_ZOOKEEPER_CONNECT=192.168.0.245:2181/kafka \
	-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.0.245:9092 \
	-e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 \
	-v /etc/localtime:/etc/localtime \
  wurstmeister/kafka:2.13-2.7.1)
name=$(docker inspect -f "{{.Name}}" kafka)
binds=$(docker inspect -f "{{.HostConfig.Binds}}" kafka)
echo kafka-name: "${name:1}"
echo kafka-id: "${run_id:0:12}"
echo kafka-binds: "${binds}"
echo "----------------------docker kafka running successfully！-----------------------"